home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- from checkbox.lib.cache import cache
- from checkbox.lib.conversion import string_to_type
- from checkbox.properties import Path
- from checkbox.registries.data import DataRegistry
- from checkbox.registries.filename import FilenameRegistry
- from checkbox.registries.link import LinkRegistry
-
- class ProcessorRegistry(DataRegistry):
- '''Registry for processor information.
-
- Each item contained in this registry consists of the information
- for a single processor in the /proc/cpuinfo file.
- '''
-
- def items(self):
- items = []
- for l in self.split('\n'):
- pass
-
- items.append(('processor', LinkRegistry(self)))
- return items
-
-
-
- class CpuinfoRegistry(FilenameRegistry):
- '''Registry for cpuinfo information.
-
- Each item contained in this registry consists of the processor number
- as key and the corresponding processor registry as value.
- '''
- filename = Path(default = '/proc/cpuinfo')
-
- def items(self):
- items = []
- for d in self.split('\n\n'):
- if d:
- continue
- _[1][d.strip()]
-
- return items
-
- items = cache(items)
-
- factory = CpuinfoRegistry
-